﻿//------------------------------------------------------------------------------
// <copyright file="RpcSocketTransportMessage.cs" company="Microsoft">
//     Copyright (c) Microsoft Corporation.  All rights reserved.
// </copyright>
//------------------------------------------------------------------------------

namespace Microsoft.Internal.GamesTest.Rpc.Client.Transport
{
    using System;
    using System.Runtime.Serialization;

    /// <summary>
    /// A message object used to encapsulate the metadata about a socket message sent
    /// to an RPC server or client.
    /// </summary>
    [DataContract]
    internal class RpcSocketTransportMessage
    {
        /// <summary>
        /// Gets or sets the server Id to use for this message.
        /// </summary>
        [DataMember(Name = "serverId")]
        public Guid ServerId { get; set; }

        /// <summary>
        /// Gets or sets the version of the product that initiated this message.
        /// </summary>
        [DataMember(Name = "version")]
        public string Version { get; set; }

        /// <summary>
        /// Gets or sets the error code associated with this message.
        /// </summary>
        [DataMember(Name = "errorCode")]
        public int ErrorCode { get; set; }

        /// <summary>
        /// Gets or sets the serialized RpcMessage to be sent.
        /// </summary>
        [DataMember(Name = "rpcMessage")]
        public string RpcMessage { get; set; }
    }
}
